//
//  JSCollectionButtonCell.swift
//  fho
//
//  Created by 郭颢源 on 2021/3/29.
//

import UIKit

class JSCollectionButtonCell: UICollectionViewCell {

    lazy var imageView: UIImageView = {
        var _imageView = UIImageView()
        _imageView.contentMode = .scaleAspectFit
        _imageView.image = UIImage(named: "iconFive")
        return _imageView
    }()
    lazy var titleLabel: UILabel = {
        var _titleLabel = UILabel()
        _titleLabel.text = "按钮"
        return _titleLabel
    }()
    override init(frame: CGRect) {
        super.init(frame: frame)
        contentView.backgroundColor = .white
        contentView.addSubview(imageView)
        contentView.addSubview(titleLabel)
        imageView.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.top.equalTo(20)
            make.width.equalToSuperview().multipliedBy(0.6)
            make.bottom.equalTo(contentView.snp.centerY).offset(10)
        }
        titleLabel.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.top.equalTo(contentView.snp.centerY).offset(20)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
